# See for codes
# http://www.djangoproject.com/documentation/models/test_client/
from datetime import datetime, timedelta
import tempfile

from django.test import TestCase, Client
from django.contrib.auth.models import User
from django.utils.http import urlquote
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage
from django.contrib.auth.models import AnonymousUser

from pypsqueak.artifact.models import *

class ArtifactModelFileUploadTestCase(TestCase):
	"""
	Test Models
	"""

	def setUp(self):
		self.user = User( username = "Bob" )
		self.user.save()


	def testFileInMemory(self):
		""" Upload a file for an artifact """

		f = ContentFile( 'Default Content' )

		self.artifact = Artifact( file=f )
		self.artifact.save()

		self.assertEquals( True, True )

	def tearDown(self):
		self.artifact.delete()
		self.user.delete()


